console.log(location.href)
function a() {
    let url = location.search;
    console.log(url)

    //发请求
    fetch(`http://chst.vip:1234/api/getmoneyctrlproduct${url}`)
        .then(body => body.json())
        .then(res => {
            console.log(res);
            let html = "";
            res.result.forEach(item => {
                html +=
                    `<div class="info">
                    <div class="title">
                        <h3>${item.productName}</h3>
                    </div>
                    <div class="other">
                        <span>${item.productFrom}&nbsp|&nbsp${item.productTime}</span>
                        <span>${item.productTips}</span>
                    </div>
                    <div class="container">
                        ${item.productImgSm}
                        ${item.productInfo2}
                    </div>
                    <div class="bigimg">${item.productImgSm}</div>
                    <div class="city">
                        ${item.productCity}
                    </div>
                </div>
                <hr>
                <section class="buy">
                    <a href="#">前往购买</a>
                </section>
                <section class="img">
                    <img src="../assets/images/mmbweixin2.png">
                </section>
                <section class="comment">
                    ${item.productComment}
                </section>
            </div>
                    `
            })
            let htmll = document.querySelector("#main")
            console.log(html);
            htmll.innerHTML = html

        })
}
a()